Rect

fun Rect(x: Int = 0, y: Int = 0, width: Int, height: Int): Rect
fun Rect(x: Int = 0, y: Int = 0, width: Int, height: Int): Rect

Creates a new instance of Rect with the given parameters.

Since

8.0.0

Parameters

x

The horizontal coordinate of the upper-left corner of the rectangle.

y

The vertical coordinate of the upper-left corner of the rectangle.

width

The width of the rectangle.

height

The height of the rectangle.

Throws


fun Rect(origin: Point = Point.empty(), size: Size): Rect
fun Rect(origin: Point = Point.empty(), size: Size): Rect

Creates a new instance of Rect with the given origin and size.

Since

8.0.0

Parameters

origin

The upper-left corner of the rectangle.

size

The size of the rectangle.